package com.ruoyi.asms.domain;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 【请填写功能名称】对象 installation
 * 
 * @author yfkj
 * @date 2022-04-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Installation
{
    private static final long serialVersionUID = 1L;
    /** 主键 */
    @TableField(exist = true)
    @TableId(type= IdType.AUTO)
    @ApiModelProperty(value =  "${comment}")
    private Long installationId;
    /** 工单内容 */
    @Excel(name = "工单内容")
    @TableField(exist = true)
    @ApiModelProperty(value =  "工单内容")
    private String installationContent;
    /** 资产数量 */
    @Excel(name = "资产数量")
    @TableField(exist = true)
    @ApiModelProperty(value =  "安装资产总数")
    private Integer assetNumber;
    @Excel(name = "待完成资产数量")
    @TableField(exist = true)
    @ApiModelProperty(value =  "待完成安装资产数")
    private Integer noAssetNumber;
    /** 工单任务id */
    @TableField(exist = true)
    @ApiModelProperty(value =  "工单任务id")
    private Long installationTaskId;
    /** 工单负责人Id */
    @TableField(exist = true)
    @ApiModelProperty(value =  "工单负责人Id")
    private Long userId;
    /** 工单开始时间 */
    @Excel(name = "工单开始时间",readConverterExp = "0= ---",dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = true)
    @ApiModelProperty(value =  "工单开始时间")
    private Long startTime;
    /** 工单完成时间 */
    @Excel(name = "工单完成时间",readConverterExp = "0= ---",dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = true)
    @ApiModelProperty(value =  "工单完成时间")
    private Long endTime;
    /** 安装的资产ID，用逗号隔开 */
    @TableField(exist = true)
    @ApiModelProperty(value =  "安装的资产ID，用逗号隔开")
    private String assetIds;
    /** 初始状态 ： 0：待指派  1：已指派 2：已完成 */
    @Excel(name= "工单状态",readConverterExp = "0=待指派,2=已完成,1=已指派")
    @TableField(exist = true)
    @ApiModelProperty(value =  "初始状态 ： 0：待指派  1：已指派 2：已完成")
    private Integer installationStatus;
    /** 安装位置id */
    @TableField(exist = true)
    @ApiModelProperty(value =  "安装位置id")
    private Long addressId;
    /** 安装位置名称 */
    @Excel(name = "安装位置名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "安装位置名称")
    private String addressName;
    /** 客户部门id */
    @TableField(exist = true)
    @ApiModelProperty(value =  "客户部门id")
    private Long deptId;
    /** 客户部门名称 */
    @Excel(name = "客户部门名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "客户部门名称")
    private String deptName;
    @Excel(name = "备注")
    @TableField(exist = true)
    @ApiModelProperty(value =  "备注")
    private String remark;


    public static final String INSTALLATION_ID="installation_id";
    public static final String INSTALLATION_CONTENT="installation_content";
    public static final String ASSET_NUMBER="asset_number";
    public static final String INSTALLATION_TASK_ID="installation_task_id";
    public static final String USER_ID="user_id";
    public static final String START_TIME="start_time";
    public static final String END_TIME="end_time";
    public static final String ASSET_IDS="asset_ids";
    public static final String INSTALLATION_STATUS="installation_status";
    public static final String REMARK="remark";
    public static final String ADDRESS_ID="address_id";
    public static final String ADDRESS_NAME="address_name";
    public static final String DEPT_ID="dept_id";
    public static final String DEPT_NAME="dept_name";
    public static final String NO_ASSET_NUMBER = "no_asset_number";
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("installationId", getInstallationId())
            .append("installationContent", getInstallationContent())
            .append("assetNumber", getAssetNumber())
            .append("installationTaskId", getInstallationTaskId())
            .append("userId", getUserId())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("assetIds", getAssetIds())
            .append("installationStatus", getInstallationStatus())
            .append("remark", getRemark())
            .append("addressId", getAddressId())
            .append("addressName", getAddressName())
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            .toString();
    }
}
